home *** CD-ROM | disk | FTP | other *** search
- Path: bcfreenet.seflin.lib.fl.us!bcfreenet!z007400b
- From: z007400b@bcfreenet.seflin.lib.fl.us (Ralph Silverman)
- Newsgroups: comp.lang.c
- Subject: Re: Problem with ascii to number conversion.
- Date: 30 Jan 1996 18:15:46 GMT
- Organization: SEFLIN Free-Net - Broward
- Distribution: world
- Message-ID: <4eln8i$4mv@bcfreenet.seflin.lib.fl.us>
- References: <96012012081730705@busilink.com>
- NNTP-Posting-Host: bcfreenet.seflin.lib.fl.us
- X-Newsreader: TIN [version 1.2 PL2]
-
- Paul Kelley (paul.kelley@busilink.com) wrote:
- : Hi,
- : i am a beginner c programmer, stuck on what i thought was a simple
- : problem. I have an ascii input file that contains payroll info for a
- : month, the data is monetary values as ascii strings. I am trying to
- : convert the ascii ti numbers total the result then place in another
- : file. I am using micrsoft quick C and the ascii to number functions in
- : it. Apparenntly these functions only work correctly up to four digits.
- : After that teh ouput goes wild.
- : Can anyone help me understand what is not corrrect? Is there any
- : routines out there that can do this or am i looking at hardare/softare
- : limitation?
- : Any suggestions input or help would subject the giver
- : to a profusion of thanks and positive thoughts.
-
- : thanks
- : Paul.
-
- --
- **********begin r.s. response**********
-
- suggest using
- printf()
- for output,
- or
- fprintf()
- let this format for you.
-
- regarding money values...
- do these use decimal extensions
- for cents?
-
- if so,
- your calculation,
- output
- and
- formatting
-
- are not simple integer matters...
-
- **********end r.s. response************
- Ralph Silverman
- z007400b@bcfreenet.seflin.lib.fl.us
-
-